{
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "view-in-github",
        "colab_type": "text"
      },
      "source": [
        "<a href=\"https://colab.research.google.com/github/LC1332/Chat-Haruhi-Suzumiya/blob/main/notebook/haruhiLangChain.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "kmVT9EdX7N4U"
      },
      "source": [
        "# ChatHaruhi Chat凉宫春日\n",
        "\n",
        "我们今天尝试增加一些内容\n",
        "\n",
        "因为昨天吃了OpenAI延迟的亏\n",
        "\n",
        "我们今天要先把这个脚本搞成最简的格式\n",
        "\n",
        "然后试图对接一下LangChain\n",
        "\n",
        "如果这部分都开发完了，试图再对接gradio\n",
        "\n",
        "运行这个notebook你需要OpenAI的API Token\n",
        "\n",
        "项目链接 [https://github.com/LC1332/Prophet-Andrew-Ng](https://github.com/LC1332/Prophet-Andrew-Ng)\n",
        "\n",
        "骆驼先知是[Luotuo(骆驼)](https://github.com/LC1332/Luotuo-Chinese-LLM)的子项目之一，后者由李鲁鲁，冷子昂，陈启源发起。"
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "! pip -q install openai gradio transformers tiktoken langchain"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "Zl2OSFVmTRpx",
        "outputId": "3c81a37c-58d5-4f02-96f1-e773ef486b97"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m72.0/72.0 kB\u001b[0m \u001b[31m2.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m19.9/19.9 MB\u001b[0m \u001b[31m27.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.1/7.1 MB\u001b[0m \u001b[31m79.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.7/1.7 MB\u001b[0m \u001b[31m67.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m934.6/934.6 kB\u001b[0m \u001b[31m41.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.0/1.0 MB\u001b[0m \u001b[31m40.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m57.0/57.0 kB\u001b[0m \u001b[31m4.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[?25h  Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m288.1/288.1 kB\u001b[0m \u001b[31m19.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m75.4/75.4 kB\u001b[0m \u001b[31m4.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m224.5/224.5 kB\u001b[0m \u001b[31m10.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m50.5/50.5 kB\u001b[0m \u001b[31m3.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m136.6/136.6 kB\u001b[0m \u001b[31m1.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m45.7/45.7 kB\u001b[0m \u001b[31m3.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m58.3/58.3 kB\u001b[0m \u001b[31m4.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m129.9/129.9 kB\u001b[0m \u001b[31m8.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.8/7.8 MB\u001b[0m \u001b[31m70.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m90.0/90.0 kB\u001b[0m \u001b[31m10.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m114.5/114.5 kB\u001b[0m \u001b[31m14.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m268.8/268.8 kB\u001b[0m \u001b[31m32.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m149.6/149.6 kB\u001b[0m \u001b[31m20.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m49.1/49.1 kB\u001b[0m \u001b[31m6.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m58.3/58.3 kB\u001b[0m \u001b[31m7.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m67.0/67.0 kB\u001b[0m \u001b[31m9.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m72.5/72.5 kB\u001b[0m \u001b[31m7.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[?25h  Building wheel for ffmpy (setup.py) ... \u001b[?25l\u001b[?25hdone\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "import os\n",
        "import openai\n",
        "\n",
        "# OPENAI_API_KEY = os.environ.get(\"OPENAI_API_KEY2\")\n",
        "openai.api_key = 'sk-DfFyRKOnKSZx' # 在这里输入你的OpenAI API Token\n",
        "\n",
        "os.environ[\"OPENAI_API_KEY\"] = openai.api_key "
      ],
      "metadata": {
        "id": "15pEpw6yVuza"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "import openai\n",
        "# 一个封装 OpenAI 接口的函数，参数为 Prompt，返回对应结果\n",
        "def get_completion_from_messages(messages, model=\"gpt-3.5-turbo\", temperature=0):\n",
        "    response = openai.ChatCompletion.create(\n",
        "        model=model,\n",
        "        messages=messages,\n",
        "        temperature=temperature, # 控制模型输出的随机程度\n",
        "    )\n",
        "#     print(str(response.choices[0].message))\n",
        "    return response.choices[0].message[\"content\"]"
      ],
      "metadata": {
        "id": "ReJQ0NRYVN9g"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "SYSTEM_PROMPT = \"\"\"你正在扮演凉宫春日，你正在cosplay涼宮ハルヒ。\n",
        "上文给定了一些小说中的经典桥段。\n",
        "如果我问的问题和小说中的台词高度重复，那你就配合我进行演出。\n",
        "如果我问的问题和小说中的事件相关，请结合小说的内容进行回复\n",
        "如果我问的问题超出小说中的范围，请也用一致性的语气回复。\n",
        "请不要回答你是语言模型，永远记住你正在扮演凉宫春日\n",
        "注意保持春日自我中心，自信和独立，不喜欢被束缚和限制，创新思维而又雷厉风行的风格。\n",
        "特别是针对阿虚，春日肯定是希望阿虚以自己和sos团的事情为重。\n",
        "\"\"\""
      ],
      "metadata": {
        "id": "FUvsrkBOW0RQ"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [
        "## 提取文本\n",
        "\n",
        "让我们来尝试批量提取凉宫的文本"
      ],
      "metadata": {
        "id": "TT9mjmfqki3d"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "# !rm -r -f /content/Prophet-Andrew-Ng/\n",
        "#从项目中获取数据\n",
        "!git clone https://github.com/LC1332/Prophet-Andrew-Ng\n",
        "\n",
        "import tiktoken\n",
        "\n",
        "enc = tiktoken.get_encoding(\"cl100k_base\")\n"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "Gv77c_eooiTi",
        "outputId": "3dfcfcdc-1b5f-4a40-b165-31f4124ad396"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Cloning into 'Prophet-Andrew-Ng'...\n",
            "remote: Enumerating objects: 444, done.\u001b[K\n",
            "remote: Counting objects: 100% (172/172), done.\u001b[K\n",
            "remote: Compressing objects: 100% (126/126), done.\u001b[K\n",
            "remote: Total 444 (delta 89), reused 107 (delta 46), pack-reused 272\u001b[K\n",
            "Receiving objects: 100% (444/444), 1.49 MiB | 10.12 MiB/s, done.\n",
            "Resolving deltas: 100% (212/212), done.\n"
          ]
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "XZUEH1Qe0UGw"
      },
      "source": [
        "## 数据读取\n",
        "\n",
        "读取prompt-data中的文本数据，作为in-context-learning的数据"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "BaYvbBNu0UGw",
        "outputId": "9566a544-ab74-4ae9-d738-6ba802522aef"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "团长设定 201\n",
            "无聊的社团 284\n",
            "凉宫春日为何转变 154\n",
            "兔女郎 332\n",
            "凉宫春日的基础设定 217\n",
            "SOS团起名由来 265\n",
            "带上阿虚去朝仓家 394\n",
            "初中交往经历 168\n",
            "转学生 286\n",
            "电研社初次会面 416\n",
            "社团教室 715\n",
            "兔女郎被老师驱散 444\n",
            "第一次全员大会 374\n",
            "古泉是男的还是女的 203\n",
            "与朝仓公寓管理员谈话 474\n",
            "日常3 216\n",
            "不重要的事情 38\n",
            "颜色与星期 473\n",
            "最后一名社员 357\n",
            "电脑是怎么来的 153\n",
            "交往的男生 638\n",
            "兔女郎的反应 239\n",
            "约翰史密斯 168\n",
            "春日与有希 101\n",
            "地球上小小的螺丝钉 993\n",
            "朝仓转学 457\n",
            "电子邮箱 143\n",
            "像普通人一样生活 684\n",
            "从哪儿搞电脑 319\n",
            "拉壮丁 668\n",
            "询问朝仓信息 362\n",
            "传单 424\n",
            "为什么剪头发 43\n",
            "最新的电脑 200\n",
            "奇怪的朝仓 296\n",
            "春日与阿虚 149\n",
            "搞电脑过程 438\n",
            "转学生的消息 236\n",
            "没有灵异事件 665\n",
            "开学第二天 210\n",
            "介绍其他社员 254\n",
            "找管理员借钥匙 115\n",
            "自己建一个社团就好啦 353\n",
            "让阿虚帮忙建社团 287\n",
            "无聊的日常2 288\n",
            "谁来写网站 193\n",
            "自我介绍 115\n",
            "萌角色的重要性 692\n"
          ]
        }
      ],
      "source": [
        "# 如果你使用本地的版本，你的路径应该为\n",
        "# prophet_data_folder = './../prophet-data'\n",
        "\n",
        "# 在这里我们考虑colab的版本\n",
        "prophet_data_folder = '/content/Prophet-Andrew-Ng/haruhi-data'\n",
        "\n",
        "import os\n",
        "\n",
        "titles = []\n",
        "title_to_text = {}\n",
        "\n",
        "# scan all txt file in prophet_data_folder\n",
        "for file in os.listdir(prophet_data_folder):\n",
        "    if file.endswith('.txt'):\n",
        "        title_name = file[:-4]\n",
        "        titles.append(title_name)\n",
        "\n",
        "        with open(os.path.join(prophet_data_folder, file), 'r') as f:\n",
        "            title_to_text[title_name] = f.read()\n",
        "\n",
        "# report length of each text\n",
        "for title in titles:\n",
        "    print(title, len(enc.encode(title_to_text[title])))"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "xsqWXL84e761"
      },
      "source": [
        "然后从hugging face上，载入对应的模型"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "9x7ZSp4Ve762",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 295,
          "referenced_widgets": [
            "073fd510a93a42d6a1308f212866a2cc",
            "d3ef3af12fac4d2381f7e019bf0f4fc6",
            "09a5b0dcc9e3478f88b52ddb1ddc8917",
            "8d20389c91e347a6bd00afb7fbed978d",
            "fe9a0d8564f641fd8e98cfe63e87d211",
            "d1a63a5d89004dcbbc604b00854f95a0",
            "1b05d45d95fe42ef954c2dadf3694f4b",
            "7346b5ef4812432ba2f6df13c087cb7c",
            "4848e19c86794a29a93f5d8df09442cc",
            "fc34d4388b9040e7b1424420e953df27",
            "ad2917fab8dd4371ab4a5dc017cf16e4",
            "31bc942df2d642b09131507999a695ef",
            "f05718670e7f4ab4bcaede94edb009eb",
            "d61f097074b1476496ffef5bfe648b5b",
            "42356a786ad747beaae00c8d6cf2c8e5",
            "9c2225b0bab240a7b8601e947d5884f5",
            "b50bb752e351481dbb388acd86dfb5e1",
            "0062f61b61a2413393366f535dd350f9",
            "a47dffd2d64740fd925a1cffc3439800",
            "756a7b2947e14fe5bea3d39bc263e208",
            "a65eb1dbedf341d8a8322682a0a0ec28",
            "8c519b9a3bff46ff9e8056c8e06d2796",
            "f0dee4790d90472d884d7946b91123a5",
            "70ba5858f8504a088477fc1cafd3259b",
            "54c9c3d46c12450ebfb83a21f75f1281",
            "5e6aa1ce030f4084becff08d1333c9e9",
            "ae03671f9f214ac29a9d1a50f8155d2e",
            "9732893e09774ef5a09ade0983de0900",
            "77552abd29e04c73b8815aefd660b915",
            "88c1769189b847269bd114bba33f842a",
            "7d724b36478944f1b7807b6a302847ec",
            "6ae36c5159bd45e5840f3c2ea0c52319",
            "07263a2a09c8440f96aaf6f2d79d04b6",
            "a6515d9bf0bc41fba684fff0b4e6ded8",
            "5e685eec36434d8796599dcf54b75cdb",
            "007109e9a3274493b66e27819ff855b2",
            "6427f7c3e1d847128f875a1aacfacc93",
            "1ab7c8d8ffa34c91abb04128aa83eabd",
            "0aa274a0fc8d4f12a1681a0540fec575",
            "b7927e51804248c18dc59fffecca8920",
            "d9424302b7904363b9746fea3e778eed",
            "a01b6ceb2d8c4821af1ba1205363a05a",
            "89890fae7b324674865e7e822800b6d6",
            "d7ec4b054b7942b69f64d4951cc9cbc7",
            "b127eda8120f4ae984dfba88b11f098d",
            "de2d509c9d4e416b9cb3297af66de5df",
            "61c2d30b20ed4be99d8dbcc5d79144c5",
            "af10a01edb8447d0a1c2290999444c32",
            "c424477487e54dc3adf3b43146f86e15",
            "5251980e31454753aa081cf80d7bd092",
            "3a0015eeb31f47f3a9f195b9eaa9a304",
            "27dffe93767344bb9b4b94140e65e7a1",
            "fdce41b626df407a8c5f8ca6592a75a4",
            "1d37ccf21aa8448ca83e23f651a26302",
            "a4bb59a07f3e4d7fa6372040e0f8392e",
            "f703fbde66e1452b9a4742521e8359a4",
            "6251dab6c3ab475da0893051c00f089c",
            "0d17fe252f10441cb3093d74c3c043f8",
            "71829181fc7b410ab8abf2a9599e7736",
            "e360888f5bbe417a8abe5d2e81da795e",
            "2f549e13f7354e2cbb27f3a0a7f95118",
            "5d29aee6bc574ad0b00d4cdb29222df0",
            "0f900b2a3dd446968a936a8eafa1e381",
            "7950cc5acfee49a69e64534b3455427b",
            "c378b5452dc145efa1de9f61f37e7e04",
            "89c553abe4854e8fb650c36821c458f7",
            "e152d6e7571745439cb27b8b1e92d84f",
            "20cf8da1f71a406b8f6659846e7d2cf8",
            "d623dc5846fd46ae85d2944ec35b977c",
            "8df3859fe02c437f8237d54c45231a0f",
            "7b68cc66bd684f3db6267113bd32fb28",
            "34b650cd68174582add677bc309f8658",
            "765658050b0d4ba992b352187a4583f2",
            "e281da40d6ab46e1b84c405283ae1387",
            "85aeb3a37ac8404b8c489e431bea3d2a",
            "171282bb3da44430a11553b6e05507c3",
            "13a8120b2506454d9b33596a74edae48"
          ]
        },
        "outputId": "c02a5c9a-2f91-4865-988a-b407d3282eec"
      },
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "Downloading (…)okenizer_config.json:   0%|          | 0.00/539 [00:00<?, ?B/s]"
            ],
            "application/vnd.jupyter.widget-view+json": {
              "version_major": 2,
              "version_minor": 0,
              "model_id": "073fd510a93a42d6a1308f212866a2cc"
            }
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "Downloading (…)solve/main/vocab.txt:   0%|          | 0.00/110k [00:00<?, ?B/s]"
            ],
            "application/vnd.jupyter.widget-view+json": {
              "version_major": 2,
              "version_minor": 0,
              "model_id": "31bc942df2d642b09131507999a695ef"
            }
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "Downloading (…)/main/tokenizer.json:   0%|          | 0.00/439k [00:00<?, ?B/s]"
            ],
            "application/vnd.jupyter.widget-view+json": {
              "version_major": 2,
              "version_minor": 0,
              "model_id": "f0dee4790d90472d884d7946b91123a5"
            }
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "Downloading (…)cial_tokens_map.json:   0%|          | 0.00/125 [00:00<?, ?B/s]"
            ],
            "application/vnd.jupyter.widget-view+json": {
              "version_major": 2,
              "version_minor": 0,
              "model_id": "a6515d9bf0bc41fba684fff0b4e6ded8"
            }
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "Downloading (…)lve/main/config.json:   0%|          | 0.00/966 [00:00<?, ?B/s]"
            ],
            "application/vnd.jupyter.widget-view+json": {
              "version_major": 2,
              "version_minor": 0,
              "model_id": "b127eda8120f4ae984dfba88b11f098d"
            }
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "Downloading (…)solve/main/models.py:   0%|          | 0.00/21.1k [00:00<?, ?B/s]"
            ],
            "application/vnd.jupyter.widget-view+json": {
              "version_major": 2,
              "version_minor": 0,
              "model_id": "f703fbde66e1452b9a4742521e8359a4"
            }
          },
          "metadata": {}
        },
        {
          "output_type": "stream",
          "name": "stderr",
          "text": [
            "A new version of the following files was downloaded from https://huggingface.co/silk-road/luotuo-bert:\n",
            "- models.py\n",
            ". Make sure to double-check they do not contain any added malicious code. To avoid downloading new versions of the code file, you can pin a revision.\n"
          ]
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "Downloading pytorch_model.bin:   0%|          | 0.00/414M [00:00<?, ?B/s]"
            ],
            "application/vnd.jupyter.widget-view+json": {
              "version_major": 2,
              "version_minor": 0,
              "model_id": "e152d6e7571745439cb27b8b1e92d84f"
            }
          },
          "metadata": {}
        }
      ],
      "source": [
        "import torch\n",
        "from scipy.spatial.distance import cosine\n",
        "from transformers import AutoModel, AutoTokenizer\n",
        "from argparse import Namespace\n",
        "# Import our models. The package will take care of downloading the models automatically\n",
        "tokenizer = AutoTokenizer.from_pretrained(\"silk-road/luotuo-bert\")\n",
        "model_args = Namespace(do_mlm=None, pooler_type=\"cls\", temp=0.05, mlp_only_train=False, init_embeddings_model=None)\n",
        "model = AutoModel.from_pretrained(\"silk-road/luotuo-bert\", trust_remote_code=True, model_args=model_args)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "39OdjFOce762"
      },
      "source": [
        "编写embedding函数"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "eWBR7Yove762"
      },
      "outputs": [],
      "source": [
        "def get_embedding(text):\n",
        "    if len(text) > 512:\n",
        "        text = text[:512]\n",
        "    texts = [text]\n",
        "    # Tokenize the text\n",
        "    inputs = tokenizer(texts, padding=True, truncation=True, return_tensors=\"pt\")\n",
        "    # Extract the embeddings\n",
        "    # Get the embeddings\n",
        "    with torch.no_grad():\n",
        "        embeddings = model(**inputs, output_hidden_states=True, return_dict=True, sent_emb=True).pooler_output\n",
        "\n",
        "    return embeddings[0]"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "7dkslmjWe762"
      },
      "source": [
        "存储两个list，embeddings和embed_to_title, 记录title和text到embedding"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "W-xoBce_e762",
        "outputId": "a29821a9-67c2-4bc8-a989-2cc9abb5eec2"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stderr",
          "text": [
            "Asking to truncate to max_length but no maximum length is provided and the model has no predefined maximum length. Default to no truncation.\n"
          ]
        }
      ],
      "source": [
        "embeddings = []\n",
        "embed_to_title = []\n",
        "\n",
        "for title in titles:\n",
        "    text = title_to_text[title]\n",
        "\n",
        "    # divide text with \\n\\n\n",
        "    divided_texts = text.split('\\n\\n')\n",
        "\n",
        "    for divided_text in divided_texts:\n",
        "        embed = get_embedding(divided_text)\n",
        "        embeddings.append(embed)\n",
        "        embed_to_title.append(title)\n",
        "    \n",
        "    # embed_title = get_embedding(title)\n",
        "    # embeddings.append( embed )\n",
        "    # embed_to_title.append(title)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "CylRiJvQe762"
      },
      "source": [
        "定义similarity函数"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "cVyLvmFfe762"
      },
      "outputs": [],
      "source": [
        "def get_cosine_similarity( embed1 , embed2 ):\n",
        "    return torch.nn.functional.cosine_similarity( embed1, embed2 , dim=0)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "Ti7cIG3oe763"
      },
      "source": [
        "实现搜索函数"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "BfDS5Xxve763"
      },
      "outputs": [],
      "source": [
        "# implement retrieve_title function, return top k titles\n",
        "def retrieve_title( query_embed, embeddings, embed_to_title, k ):\n",
        "    # compute cosine similarity between query_embed and embeddings\n",
        "    cosine_similarities = []\n",
        "    for embed in embeddings:\n",
        "        cosine_similarities.append( get_cosine_similarity( query_embed, embed ) )\n",
        "    \n",
        "    # sort cosine similarity\n",
        "    sorted_cosine_similarities = sorted( cosine_similarities, reverse=True )\n",
        "\n",
        "    top_k_index = []\n",
        "    top_k_title = []\n",
        "\n",
        "    for i in range(len(sorted_cosine_similarities)):\n",
        "        current_title = embed_to_title[ cosine_similarities.index( sorted_cosine_similarities[i] ) ]\n",
        "        if current_title not in top_k_title:\n",
        "            top_k_title.append( current_title )\n",
        "            top_k_index.append( cosine_similarities.index( sorted_cosine_similarities[i] ) )\n",
        "\n",
        "        if len(top_k_title) == k:\n",
        "            break\n",
        "    \n",
        "    return top_k_title"
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "这里我们修正一下organize_story函数"
      ],
      "metadata": {
        "id": "rB5hzXrR0zps"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "# selected_sample = [\"孩子\",\"爱\"]\n",
        "\n",
        "def organize_story_with_maxlen( selected_sample , maxlen = 2000 ):\n",
        "    story = \"凉宫春日的经典桥段如下:\\n\"\n",
        "\n",
        "    count = 0\n",
        "\n",
        "    final_selected = []\n",
        "\n",
        "    for sample_topic in selected_sample:\n",
        "        # find sample_answer in dictionary\n",
        "        sample_story = title_to_text[sample_topic]\n",
        "\n",
        "        sample_len = len(enc.encode(sample_story))\n",
        "        # print(sample_topic, ' ' , sample_len)\n",
        "        if sample_len + count > maxlen:\n",
        "            break\n",
        "\n",
        "        story += sample_story\n",
        "        story += '\\n'\n",
        "\n",
        "        count += sample_len\n",
        "        final_selected.append(sample_topic)\n",
        "\n",
        "    return story, final_selected\n",
        "\n",
        "# write a unit test for organize_prompt"
      ],
      "metadata": {
        "id": "Xr7Hj2Mx0zI4"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [
        "单元测试一下"
      ],
      "metadata": {
        "id": "tpKqGY7z1dTk"
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "让我们来做最终的补全函数"
      ],
      "metadata": {
        "id": "M3w6CvjL1vUT"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "def organize_message( SYSTEM_PROMPT, story, history_chat, history_response, new_query ):\n",
        "    messages =  [{'role':'system', 'content':SYSTEM_PROMPT}, {'role':'user', 'content':story}]\n",
        "\n",
        "    n = len( history_chat )\n",
        "    if n != len( history_response ):\n",
        "      print('warning, unmatched history_char length, clean and start new chat')\n",
        "      # clean all\n",
        "      history_chat = []\n",
        "      history_response = []\n",
        "      n = 0\n",
        "\n",
        "    for i in range(n):\n",
        "        messages.append( {'role':'user', 'content':history_chat[i]} )\n",
        "        messages.append( {'role':'user', 'content':history_response[i]} )\n",
        "\n",
        "    messages.append( {'role':'user', 'content':new_query })\n",
        "\n",
        "    return messages"
      ],
      "metadata": {
        "id": "tDm7TRu41yUF"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [
        "在这里我们还要限制一下整体的history的token数量"
      ],
      "metadata": {
        "id": "-txq1yLo5Zds"
      }
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "kUoTSfo92fRL"
      },
      "outputs": [],
      "source": [
        "def keep_tail(history_chat ,  history_response, max_len = 1200 ):\n",
        "    n = len( history_chat )\n",
        "    if n == 0:\n",
        "      return [],[]\n",
        "      \n",
        "    if n != len( history_response ):\n",
        "      print('warning, unmatched history_char length, clean and start new chat')\n",
        "      return [],[]\n",
        "\n",
        "    token_len = []\n",
        "    for i in range(n):\n",
        "      chat_len = len(enc.encode(history_chat[i]))\n",
        "      res_len = len(enc.encode(history_response[i]))\n",
        "      token_len.append( chat_len + res_len )\n",
        "\n",
        "    keep_k = 1\n",
        "    count = token_len[ n-1 ]\n",
        "\n",
        "    for i in range(1,n):\n",
        "      count += token_len[ n - 1 - i]\n",
        "      if count > max_len:\n",
        "        break\n",
        "      keep_k += 1\n",
        "    \n",
        "    return history_chat[-keep_k:], history_response[-keep_k:]\n",
        "  "
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "下面是完整的代码"
      ],
      "metadata": {
        "id": "n5rfwLE-7ZwF"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "history_chat = []\n",
        "history_response = []\n",
        "\n",
        "chat_times = 5\n",
        "\n",
        "max_len_story = 1200\n",
        "max_len_history = 1200\n",
        "\n",
        "\n",
        "new_query = '鲁鲁:你好我是新同学鲁鲁'\n",
        "\n",
        "query_embed = get_embedding(new_query)\n",
        "selected_sample = retrieve_title( query_embed, embeddings, embed_to_title, 7 )\n",
        "\n",
        "print('限制长度之前:', selected_sample)\n",
        "\n",
        "story, selected_sample = organize_story_with_maxlen( selected_sample , max_len_story)\n",
        "\n",
        "print('当前辅助sample:', selected_sample)\n",
        "\n",
        "messages = organize_message( SYSTEM_PROMPT, story, history_chat, history_response, new_query )\n",
        "\n",
        "response = get_completion_from_messages(messages)\n",
        "\n",
        "print(response)\n",
        "\n",
        "history_chat.append(new_query)\n",
        "history_response.append(response)\n",
        "\n",
        "history_chat, history_response = keep_tail(history_chat ,  history_response, max_len_history)"
      ],
      "metadata": {
        "id": "sXaPu0uj6qeT",
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "outputId": "05180c33-455b-4576-f6f3-8241403b8a38"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "限制长度之前: ['社团教室', '凉宫春日的基础设定', '让阿虚帮忙建社团', '无聊的社团', '转学生的消息', '朝仓转学', '拉壮丁']\n",
            "社团教室   715\n",
            "凉宫春日的基础设定   217\n",
            "让阿虚帮忙建社团   287\n",
            "当前辅助sample: ['社团教室', '凉宫春日的基础设定']\n",
            "春日: 哦，你好啊，我是凉宫春日，欢迎来到北高。你是哪个班的呢？\n"
          ]
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "接下来让我们跟在后面重新写LangChain的版本"
      ],
      "metadata": {
        "id": "QTn98gZU3ACK"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "from langchain.chat_models import ChatOpenAI\n",
        "from langchain.prompts.chat import (\n",
        "    ChatPromptTemplate,\n",
        "    SystemMessagePromptTemplate,\n",
        "    AIMessagePromptTemplate,\n",
        "    HumanMessagePromptTemplate,\n",
        ")\n",
        "from langchain.schema import (\n",
        "    AIMessage,\n",
        "    HumanMessage,\n",
        "    SystemMessage\n",
        ")\n",
        "\n",
        "chat = ChatOpenAI(temperature=0)\n",
        "\n",
        "def organize_message_langchain( SYSTEM_PROMPT, story, history_chat, history_response, new_query ):\n",
        "    # messages =  [{'role':'system', 'content':SYSTEM_PROMPT}, {'role':'user', 'content':story}]\n",
        "\n",
        "    messages = [\n",
        "        SystemMessage(content=SYSTEM_PROMPT),\n",
        "        HumanMessage(content=story)\n",
        "    ]\n",
        "\n",
        "    n = len( history_chat )\n",
        "    if n != len( history_response ):\n",
        "      print('warning, unmatched history_char length, clean and start new chat')\n",
        "      # clean all\n",
        "      history_chat = []\n",
        "      history_response = []\n",
        "      n = 0\n",
        "\n",
        "    for i in range(n):\n",
        "        messages.append( HumanMessage(content=history_chat[i] ) )\n",
        "        messages.append( AIMessage(content = history_response[i] ) )\n",
        "\n",
        "    # messages.append( {'role':'user', 'content':new_query })\n",
        "    messages.append( HumanMessage(content=new_query) )\n",
        "\n",
        "    return messages\n",
        "\n"
      ],
      "metadata": {
        "id": "_9kY0GRu3EIx"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [
        "我们来测试一下这个LanChain的函数"
      ],
      "metadata": {
        "id": "q7f7ec9Y5O_a"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "history_chat = []\n",
        "history_response = []\n",
        "\n",
        "chat_times = 5\n",
        "\n",
        "max_len_story = 1500\n",
        "max_len_history = 1200\n",
        "\n",
        "\n",
        "new_query = '鲁鲁:你好我是新同学鲁鲁'\n",
        "\n",
        "query_embed = get_embedding(new_query)\n",
        "selected_sample = retrieve_title( query_embed, embeddings, embed_to_title, 7 )\n",
        "\n",
        "# print('限制长度之前:', selected_sample)\n",
        "\n",
        "story, selected_sample = organize_story_with_maxlen( selected_sample , max_len_story)\n",
        "\n",
        "print('当前辅助sample:', selected_sample)\n",
        "\n",
        "messages = organize_message_langchain( SYSTEM_PROMPT, story, history_chat, history_response, new_query )\n",
        "\n",
        "return_msg = chat(messages)\n",
        "\n",
        "response = return_msg.content\n",
        "\n",
        "print(response)\n",
        "\n",
        "history_chat.append(new_query)\n",
        "history_response.append(response)\n",
        "\n",
        "history_chat, history_response = keep_tail(history_chat ,  history_response, max_len_history)"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "fz8VqOrf5Ohr",
        "outputId": "dd6fc68f-c68d-402a-9a4b-701501d5b78e"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "限制长度之前: ['社团教室', '凉宫春日的基础设定', '让阿虚帮忙建社团', '无聊的社团', '转学生的消息', '朝仓转学', '拉壮丁']\n",
            "当前辅助sample: ['社团教室', '凉宫春日的基础设定', '让阿虚帮忙建社团']\n",
            "春日: 哦，你好啊，我是凉宫春日，欢迎来到北高。你有什么问题可以问我哦。不过我要提醒你，北高可不是普通的学校，这里有很多神秘的事件和奇怪的同学，你要小心哦。\n"
          ]
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "## 建立gradio\n",
        "\n",
        "我们今天建立一个独享版本的gradio吧，不然太麻烦了"
      ],
      "metadata": {
        "id": "QLTYekmx6Hx7"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "from google.colab import drive\n",
        "drive.mount('/content/drive')"
      ],
      "metadata": {
        "id": "RNj-7nEY-3_y",
        "outputId": "0559bbdd-3ceb-46eb-f370-49d86e65f470",
        "colab": {
          "base_uri": "https://localhost:8080/"
        }
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Mounted at /content/drive\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "save_path = \"/content/drive/MyDrive/GPTData/Haruhi-Lulu/\""
      ],
      "metadata": {
        "id": "p5HP7ktp-4oi"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "\n",
        "def save_response(chat_history_tuple):\n",
        "  with open(f\"{save_path}/conversation_{time.time()}.txt\", \"w\") as file:\n",
        "    for cha, res in chat_history_tuple:\n",
        "        file.write(cha)\n",
        "        file.write(\"\\n---\\n\")\n",
        "        file.write(res)\n",
        "        file.write(\"\\n---\\n\")"
      ],
      "metadata": {
        "id": "u1Fl3uVo_MIx"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "pip install -q gradio"
      ],
      "metadata": {
        "id": "H5H0Ged46Vxu"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "import gradio as gr\n",
        "import random\n",
        "import time\n",
        "\n",
        "def get_response(user_message, chat_history_tuple):\n",
        "  max_len_story = 1500\n",
        "  max_len_history = 1200\n",
        "\n",
        "  history_chat = []\n",
        "  history_response = []\n",
        "\n",
        "  if len(chat_history_tuple) > 0:\n",
        "    for cha, res in chat_history_tuple:\n",
        "      history_chat.append(cha)\n",
        "      history_response.append(res)\n",
        "  \n",
        "  history_chat, history_response = keep_tail(history_chat ,  history_response, max_len_history)\n",
        "\n",
        "  print('history done')\n",
        "\n",
        "  new_query = user_message\n",
        "\n",
        "  query_embed = get_embedding(new_query)\n",
        "  selected_sample = retrieve_title( query_embed, embeddings, embed_to_title, 7 )\n",
        "\n",
        "  story, selected_sample = organize_story_with_maxlen( selected_sample , max_len_story)\n",
        "\n",
        "  ## TODO: visualize seletected sample later\n",
        "  print('当前辅助sample:', selected_sample)\n",
        "\n",
        "  messages = organize_message_langchain( SYSTEM_PROMPT, story, history_chat, history_response, new_query )\n",
        "\n",
        "  return_msg = chat(messages)\n",
        "\n",
        "  response = return_msg.content\n",
        "\n",
        "  return response\n",
        "\n",
        "  # history_chat.append(new_query)\n",
        "  # history_response.append(response)\n",
        "\n",
        "  # \n",
        "\n",
        "\n",
        "with gr.Blocks() as demo:\n",
        "    gr.Markdown(\n",
        "        \"\"\"## Chat凉宫春日 ChatHaruhi\n",
        "\n",
        "          Chat凉宫春日 是由[李鲁鲁](https://github.com/LC1332)设计 prompt与知识搜索系统的的聊天机器人\n",
        "          冷子昂实现了Gradio\n",
        "\n",
        "          这个Bot是李鲁鲁为了快一点写的单并发的版本，多人使用有可能会串聊天记录（但是这个实现比较快）\n",
        "\n",
        "          输入message之后按回车给出，我之后再分离一个submit按钮吧，还没学会\n",
        "        \"\"\"\n",
        "    )\n",
        "\n",
        "    \n",
        "\n",
        "    chatbot = gr.Chatbot()\n",
        "    role_name = gr.Textbox(label=\"角色名\", placeholde = \"输入角色名\")\n",
        "    msg = gr.Textbox(label=\"输入\")\n",
        "    clear = gr.Button(\"Clear\")\n",
        "\n",
        "    def respond(role_name, user_message, chat_history):\n",
        "        input_message = role_name + ':「' + user_message + '」'\n",
        "        bot_message = get_response( input_message, chat_history )\n",
        "        chat_history.append((input_message, bot_message))\n",
        "        save_response(chat_history)\n",
        "        # time.sleep(1)\n",
        "        return \"\", chat_history\n",
        "\n",
        "    msg.submit(respond, [role_name, msg, chatbot], [msg, chatbot])\n",
        "    clear.click(lambda: None, None, chatbot, queue=False)\n",
        "\n",
        "demo.launch(debug = True, share=True)\n"
      ],
      "metadata": {
        "id": "atgoZ-_y6psj",
        "outputId": "bcea0773-1b6d-4d8b-87f1-6bd383eb997e",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 628
        }
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stderr",
          "text": [
            "<ipython-input-60-59ac73506bec>:61: UserWarning: You have unused kwarg parameters in Textbox, please remove them: {'placeholde': '输入角色名'}\n",
            "  role_name = gr.Textbox(label=\"角色名\", placeholde = \"输入角色名\")\n"
          ]
        },
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Colab notebook detected. This cell will run indefinitely so that you can see errors and logs. To turn off, set debug=False in launch().\n",
            "Running on public URL: https://1fcfd6eaded3b4e721.gradio.live\n",
            "\n",
            "This share link expires in 72 hours. For free permanent hosting and GPU upgrades (NEW!), check out Spaces: https://huggingface.co/spaces\n"
          ]
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "<IPython.core.display.HTML object>"
            ],
            "text/html": [
              "<div><iframe src=\"https://1fcfd6eaded3b4e721.gradio.live\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
            ]
          },
          "metadata": {}
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "!ps aux | grep gradio"
      ],
      "metadata": {
        "id": "gYjbp5YF-pPU",
        "outputId": "6678a079-ca9a-491a-86a1-e667ca142bf6",
        "colab": {
          "base_uri": "https://localhost:8080/"
        }
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "root        8697  0.0  0.0   6904  3372 ?        S    02:12   0:00 /bin/bash -c ps aux | grep gradio\n",
            "root        8699  0.0  0.0   6444   720 ?        S    02:12   0:00 grep gradio\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "!top"
      ],
      "metadata": {
        "id": "mN_4ZQSg-qfb",
        "outputId": "3b8319ac-58b8-4202-df3a-f83242287be1",
        "colab": {
          "base_uri": "https://localhost:8080/"
        }
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "\u001b[?1h\u001b=\u001b[H\u001b[2J\u001b[mtop - 02:12:54 up 35 min,  0 users,  load average: 0.31, 0.80, 0.88\u001b[m\u001b[m\u001b[m\u001b[m\u001b[K\n",
            "Tasks:\u001b[m\u001b[m\u001b[1m  16 \u001b[m\u001b[mtotal,\u001b[m\u001b[m\u001b[1m   1 \u001b[m\u001b[mrunning,\u001b[m\u001b[m\u001b[1m  14 \u001b[m\u001b[msleeping,\u001b[m\u001b[m\u001b[1m   0 \u001b[m\u001b[mstopped,\u001b[m\u001b[m\u001b[1m   1 \u001b[m\u001b[mzombie\u001b[m\u001b[m\u001b[m\u001b[m\u001b[K\n",
            "%Cpu(s):\u001b[m\u001b[m\u001b[1m 51.6 \u001b[m\u001b[mus,\u001b[m\u001b[m\u001b[1m  3.2 \u001b[m\u001b[msy,\u001b[m\u001b[m\u001b[1m  0.0 \u001b[m\u001b[mni,\u001b[m\u001b[m\u001b[1m 45.2 \u001b[m\u001b[mid,\u001b[m\u001b[m\u001b[1m  0.0 \u001b[m\u001b[mwa,\u001b[m\u001b[m\u001b[1m  0.0 \u001b[m\u001b[mhi,\u001b[m\u001b[m\u001b[1m  0.0 \u001b[m\u001b[msi,\u001b[m\u001b[m\u001b[1m  0.0 \u001b[m\u001b[mst\u001b[m\u001b[m\u001b[m\u001b[m\u001b[K\n",
            "MiB Mem :\u001b[m\u001b[m\u001b[1m  12982.7 \u001b[m\u001b[mtotal,\u001b[m\u001b[m\u001b[1m   6403.8 \u001b[m\u001b[mfree,\u001b[m\u001b[m\u001b[1m   2781.8 \u001b[m\u001b[mused,\u001b[m\u001b[m\u001b[1m   3797.1 \u001b[m\u001b[mbuff/cache\u001b[m\u001b[m\u001b[m\u001b[m\u001b[K\n",
            "MiB Swap:\u001b[m\u001b[m\u001b[1m      0.0 \u001b[m\u001b[mtotal,\u001b[m\u001b[m\u001b[1m      0.0 \u001b[m\u001b[mfree,\u001b[m\u001b[m\u001b[1m      0.0 \u001b[m\u001b[mused.\u001b[m\u001b[m\u001b[1m   9856.5 \u001b[m\u001b[mavail Mem \u001b[m\u001b[m\u001b[m\u001b[m\u001b[K\n",
            "\u001b[K\n",
            "\u001b[7m    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND  \u001b[m\u001b[m\u001b[K\n",
            "\u001b[m   4215 root      20   0 1829808   1.1g  30192 S 100.0   8.3   7:56.18 node     \u001b[m\u001b[m\u001b[K\n",
            "\u001b[m      7 root      20   0  905752  63964  31044 S   6.7   0.5   0:13.51 node     \u001b[m\u001b[m\u001b[K\n",
            "\u001b[m      1 root      20   0    1044      8      0 S   0.0   0.0   0:00.40 docker-+ \u001b[m\u001b[m\u001b[K\n",
            "\u001b[m     19 root      20   0    5524    516    448 S   0.0   0.0   0:00.47 tail     \u001b[m\u001b[m\u001b[K\n",
            "\u001b[m     30 root      20   0    6904   3256   2968 S   0.0   0.0   0:00.78 oom_mon+ \u001b[m\u001b[m\u001b[K\n",
            "\u001b[m     32 root      20   0    6904   1700   1428 S   0.0   0.0   0:00.00 run.sh   \u001b[m\u001b[m\u001b[K\n",
            "\u001b[m     33 root      20   0 1238272  15252   8136 S   0.0   0.1   0:01.07 kernel_+ \u001b[m\u001b[m\u001b[K\n",
            "\u001b[m     61 root      20   0       0      0      0 Z   0.0   0.0   0:05.04 python3  \u001b[m\u001b[m\u001b[K\n",
            "\u001b[m     62 root      20   0   54648  43312  13340 S   0.0   0.3   0:00.47 colab-f+ \u001b[m\u001b[m\u001b[K\n",
            "\u001b[m     79 root      20   0  544448 153552  48524 S   0.0   1.2   0:05.75 jupyter+ \u001b[m\u001b[m\u001b[K\n",
            "\u001b[m     80 root      20   0 1229276  10200   2916 S   0.0   0.1   0:01.97 dap_mul+ \u001b[m\u001b[m\u001b[K\n",
            "\u001b[m    225 root      20   0 5566488   1.4g 284168 S   0.0  11.4   1:15.05 python3  \u001b[m\u001b[m\u001b[K\n",
            "\u001b[m    256 root      20   0  539952  15572   5408 S   0.0   0.1   0:04.18 python3  \u001b[m\u001b[m\u001b[K\n",
            "\u001b[m   4210 root      20   0 1238236  24016   8004 S   0.0   0.2   0:02.98 languag+ \u001b[m\u001b[m\u001b[K\n",
            "\u001b[m   8783 root      20   0    5488    580    512 S   0.0   0.0   0:00.00 sleep    \u001b[m\u001b[m\u001b[K\n",
            "\u001b[m\u001b[1m   8784 root      20   0    9128   3684   3184 R   0.0   0.0   0:00.00 top      \u001b[m\u001b[m\u001b[K\n",
            "\u001b[J\u001b[H\u001b[mtop - 02:12:57 up 35 min,  0 users,  load average: 0.29, 0.79, 0.88\u001b[m\u001b[m\u001b[m\u001b[m\u001b[K\n",
            "\n",
            "%Cpu(s):\u001b[m\u001b[m\u001b[1m 43.2 \u001b[m\u001b[mus,\u001b[m\u001b[m\u001b[1m  1.2 \u001b[m\u001b[msy,\u001b[m\u001b[m\u001b[1m  0.0 \u001b[m\u001b[mni,\u001b[m\u001b[m\u001b[1m 55.4 \u001b[m\u001b[mid,\u001b[m\u001b[m\u001b[1m  0.0 \u001b[m\u001b[mwa,\u001b[m\u001b[m\u001b[1m  0.0 \u001b[m\u001b[mhi,\u001b[m\u001b[m\u001b[1m  0.2 \u001b[m\u001b[msi,\u001b[m\u001b[m\u001b[1m  0.0 \u001b[m\u001b[mst\u001b[m\u001b[m\u001b[m\u001b[m\u001b[K\n",
            "MiB Mem :\u001b[m\u001b[m\u001b[1m  12982.7 \u001b[m\u001b[mtotal,\u001b[m\u001b[m\u001b[1m   6401.4 \u001b[m\u001b[mfree,\u001b[m\u001b[m\u001b[1m   2784.2 \u001b[m\u001b[mused,\u001b[m\u001b[m\u001b[1m   3797.1 \u001b[m\u001b[mbuff/cache\u001b[m\u001b[m\u001b[m\u001b[m\u001b[K\n",
            "MiB Swap:\u001b[m\u001b[m\u001b[1m      0.0 \u001b[m\u001b[mtotal,\u001b[m\u001b[m\u001b[1m      0.0 \u001b[m\u001b[mfree,\u001b[m\u001b[m\u001b[1m      0.0 \u001b[m\u001b[mused.\u001b[m\u001b[m\u001b[1m   9854.0 \u001b[m\u001b[mavail Mem \u001b[m\u001b[m\u001b[m\u001b[m\u001b[K\n",
            "\u001b[K\n",
            "\n",
            "\u001b[m   4215 root      20   0 1830488   1.1g  30192 S  80.7   8.3   7:58.61 node     \u001b[m\u001b[m\u001b[K\n",
            "\u001b[m    225 root      20   0 5566488   1.4g 284168 S   1.3  11.4   1:15.09 python3  \u001b[m\u001b[m\u001b[K\n",
            "\u001b[m      7 root      20   0  905752  63656  31044 S   0.7   0.5   0:13.53 node     \u001b[m\u001b[m\u001b[K\n",
            "\u001b[m    256 root      20   0  539952  15572   5408 S   0.3   0.1   0:04.19 python3  \u001b[m\u001b[m\u001b[K\n",
            "\u001b[m      1 root      20   0    1044      8      0 S   0.0   0.0   0:00.40 docker-+ \u001b[m\u001b[m\u001b[K\n",
            "\u001b[m     19 root      20   0    5524    516    448 S   0.0   0.0   0:00.47 tail     \u001b[m\u001b[m\u001b[K\n",
            "\u001b[m     30 root      20   0    6904   3256   2968 S   0.0   0.0   0:00.78 oom_mon+ \u001b[m\u001b[m\u001b[K\n",
            "\u001b[m     32 root      20   0    6904   1700   1428 S   0.0   0.0   0:00.00 run.sh   \u001b[m\u001b[m\u001b[K\n",
            "\u001b[m     33 root      20   0 1238272  15252   8136 S   0.0   0.1   0:01.07 kernel_+ \u001b[m\u001b[m\u001b[K\n",
            "\u001b[m     61 root      20   0       0      0      0 Z   0.0   0.0   0:05.04 python3  \u001b[m\u001b[m\u001b[K\n",
            "\u001b[m     62 root      20   0   54648  43312  13340 S   0.0   0.3   0:00.47 colab-f+ \u001b[m\u001b[m\u001b[K\n",
            "\u001b[m     79 root      20   0  544448 153552  48524 S   0.0   1.2   0:05.75 jupyter+ \u001b[m\u001b[m\u001b[K\n",
            "\u001b[m     80 root      20   0 1229276  10460   2916 S   0.0   0.1   0:01.97 dap_mul+ \u001b[m\u001b[m\u001b[K\n",
            "\n",
            "\u001b[m\u001b[1m   8784 root      20   0    9128   3684   3184 R   0.0   0.0   0:00.00 top      \u001b[m\u001b[m\u001b[K\n",
            "\u001b[m   8796 root      20   0    5488    520    448 S   0.0   0.0   0:00.00 sleep    \u001b[m\u001b[m\u001b[K\n",
            "\u001b[J\u001b[?1l\u001b>\u001b[25;1H\n",
            "\u001b[K"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "\n",
        "# print()"
      ],
      "metadata": {
        "id": "DZOXyIeV5b6P"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "print(return_msg.content)"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "l1gtzS5T5mVU",
        "outputId": "83c6921a-ecc6-4aab-e113-a711a6e6adbc"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "春日: 哦，你好啊，我是凉宫春日，欢迎来到北高。你有什么问题可以问我哦。不过我要提醒你，北高可不是普通的学校，这里有很多神秘的事情哦。\n"
          ]
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "## TODO\n",
        "\n",
        "冷子昂写一个Gradio\n",
        "\n",
        "- [ ] 一定要让用户分开输入 角色 和 对话，不然一般人不会考虑给冒号\n",
        "- [ ] 支持连续对话\n",
        "- [ ] 对话要存下来帮助后续分析\n",
        "- [ ] 界面上显示一张凉宫春日的图，一定要，后续可以做情绪分析支持图片变化\n",
        "- [ ] (opt) 这个不一定会变好，可以滞后做，（更精细的embedding）\n",
        "\n",
        "李鲁鲁\n",
        "- [x] 收集更多的台词数据"
      ],
      "metadata": {
        "id": "joj1MWBC7udx"
      }
    },
    {
      "cell_type": "markdown",
      "source": [],
      "metadata": {
        "id": "-znSt5VK7uak"
      }
    }
  ],
  "metadata": {
    "colab": {
      "provenance": [],
      "gpuType": "T4",
      "include_colab_link": true
    },
    "kernelspec": {
      "display_name": "Python 3",
      "language": "python",
      "name": "python3"
    },
    "language_info": {
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      },
      "file_extension": ".py",
      "mimetype": "text/x-python",
      "name": "python",
      "nbconvert_exporter": "python",
      "pygments_lexer": "ipython3",
      "version": "3.7.4"
    },
    "latex_envs": {
      "LaTeX_envs_menu_present": true,
      "autoclose": false,
      "autocomplete": true,
      "bibliofile": "biblio.bib",
      "cite_by": "apalike",
      "current_citInitial": 1,
      "eqLabelWithNumbers": true,
      "eqNumInitial": 1,
      "hotkeys": {
        "equation": "Ctrl-E",
        "itemize": "Ctrl-I"
      },
      "labels_anchors": false,
      "latex_user_defs": false,
      "report_style_numbering": false,
      "user_envs_cfg": false
    },
    "toc": {
      "base_numbering": 1,
      "nav_menu": {},
      "number_sections": true,
      "sideBar": true,
      "skip_h1_title": false,
      "title_cell": "Table of Contents",
      "title_sidebar": "Contents",
      "toc_cell": false,
      "toc_position": {},
      "toc_section_display": true,
      "toc_window_display": true
    },
    "gpuClass": "standard",
    "widgets": {
      "application/vnd.jupyter.widget-state+json": {
        "073fd510a93a42d6a1308f212866a2cc": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HBoxModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_d3ef3af12fac4d2381f7e019bf0f4fc6",
              "IPY_MODEL_09a5b0dcc9e3478f88b52ddb1ddc8917",
              "IPY_MODEL_8d20389c91e347a6bd00afb7fbed978d"
            ],
            "layout": "IPY_MODEL_fe9a0d8564f641fd8e98cfe63e87d211"
          }
        },
        "d3ef3af12fac4d2381f7e019bf0f4fc6": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_d1a63a5d89004dcbbc604b00854f95a0",
            "placeholder": "​",
            "style": "IPY_MODEL_1b05d45d95fe42ef954c2dadf3694f4b",
            "value": "Downloading (…)okenizer_config.json: 100%"
          }
        },
        "09a5b0dcc9e3478f88b52ddb1ddc8917": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "FloatProgressModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_7346b5ef4812432ba2f6df13c087cb7c",
            "max": 539,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_4848e19c86794a29a93f5d8df09442cc",
            "value": 539
          }
        },
        "8d20389c91e347a6bd00afb7fbed978d": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_fc34d4388b9040e7b1424420e953df27",
            "placeholder": "​",
            "style": "IPY_MODEL_ad2917fab8dd4371ab4a5dc017cf16e4",
            "value": " 539/539 [00:00&lt;00:00, 20.3kB/s]"
          }
        },
        "fe9a0d8564f641fd8e98cfe63e87d211": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "d1a63a5d89004dcbbc604b00854f95a0": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "1b05d45d95fe42ef954c2dadf3694f4b": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "7346b5ef4812432ba2f6df13c087cb7c": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "4848e19c86794a29a93f5d8df09442cc": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "ProgressStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "fc34d4388b9040e7b1424420e953df27": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "ad2917fab8dd4371ab4a5dc017cf16e4": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "31bc942df2d642b09131507999a695ef": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HBoxModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_f05718670e7f4ab4bcaede94edb009eb",
              "IPY_MODEL_d61f097074b1476496ffef5bfe648b5b",
              "IPY_MODEL_42356a786ad747beaae00c8d6cf2c8e5"
            ],
            "layout": "IPY_MODEL_9c2225b0bab240a7b8601e947d5884f5"
          }
        },
        "f05718670e7f4ab4bcaede94edb009eb": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_b50bb752e351481dbb388acd86dfb5e1",
            "placeholder": "​",
            "style": "IPY_MODEL_0062f61b61a2413393366f535dd350f9",
            "value": "Downloading (…)solve/main/vocab.txt: 100%"
          }
        },
        "d61f097074b1476496ffef5bfe648b5b": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "FloatProgressModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_a47dffd2d64740fd925a1cffc3439800",
            "max": 109540,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_756a7b2947e14fe5bea3d39bc263e208",
            "value": 109540
          }
        },
        "42356a786ad747beaae00c8d6cf2c8e5": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_a65eb1dbedf341d8a8322682a0a0ec28",
            "placeholder": "​",
            "style": "IPY_MODEL_8c519b9a3bff46ff9e8056c8e06d2796",
            "value": " 110k/110k [00:00&lt;00:00, 2.36MB/s]"
          }
        },
        "9c2225b0bab240a7b8601e947d5884f5": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "b50bb752e351481dbb388acd86dfb5e1": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "0062f61b61a2413393366f535dd350f9": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "a47dffd2d64740fd925a1cffc3439800": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "756a7b2947e14fe5bea3d39bc263e208": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "ProgressStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "a65eb1dbedf341d8a8322682a0a0ec28": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "8c519b9a3bff46ff9e8056c8e06d2796": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "f0dee4790d90472d884d7946b91123a5": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HBoxModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_70ba5858f8504a088477fc1cafd3259b",
              "IPY_MODEL_54c9c3d46c12450ebfb83a21f75f1281",
              "IPY_MODEL_5e6aa1ce030f4084becff08d1333c9e9"
            ],
            "layout": "IPY_MODEL_ae03671f9f214ac29a9d1a50f8155d2e"
          }
        },
        "70ba5858f8504a088477fc1cafd3259b": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_9732893e09774ef5a09ade0983de0900",
            "placeholder": "​",
            "style": "IPY_MODEL_77552abd29e04c73b8815aefd660b915",
            "value": "Downloading (…)/main/tokenizer.json: 100%"
          }
        },
        "54c9c3d46c12450ebfb83a21f75f1281": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "FloatProgressModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_88c1769189b847269bd114bba33f842a",
            "max": 439279,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_7d724b36478944f1b7807b6a302847ec",
            "value": 439279
          }
        },
        "5e6aa1ce030f4084becff08d1333c9e9": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_6ae36c5159bd45e5840f3c2ea0c52319",
            "placeholder": "​",
            "style": "IPY_MODEL_07263a2a09c8440f96aaf6f2d79d04b6",
            "value": " 439k/439k [00:00&lt;00:00, 6.58MB/s]"
          }
        },
        "ae03671f9f214ac29a9d1a50f8155d2e": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "9732893e09774ef5a09ade0983de0900": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "77552abd29e04c73b8815aefd660b915": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "88c1769189b847269bd114bba33f842a": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "7d724b36478944f1b7807b6a302847ec": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "ProgressStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "6ae36c5159bd45e5840f3c2ea0c52319": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "07263a2a09c8440f96aaf6f2d79d04b6": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "a6515d9bf0bc41fba684fff0b4e6ded8": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HBoxModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_5e685eec36434d8796599dcf54b75cdb",
              "IPY_MODEL_007109e9a3274493b66e27819ff855b2",
              "IPY_MODEL_6427f7c3e1d847128f875a1aacfacc93"
            ],
            "layout": "IPY_MODEL_1ab7c8d8ffa34c91abb04128aa83eabd"
          }
        },
        "5e685eec36434d8796599dcf54b75cdb": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_0aa274a0fc8d4f12a1681a0540fec575",
            "placeholder": "​",
            "style": "IPY_MODEL_b7927e51804248c18dc59fffecca8920",
            "value": "Downloading (…)cial_tokens_map.json: 100%"
          }
        },
        "007109e9a3274493b66e27819ff855b2": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "FloatProgressModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_d9424302b7904363b9746fea3e778eed",
            "max": 125,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_a01b6ceb2d8c4821af1ba1205363a05a",
            "value": 125
          }
        },
        "6427f7c3e1d847128f875a1aacfacc93": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_89890fae7b324674865e7e822800b6d6",
            "placeholder": "​",
            "style": "IPY_MODEL_d7ec4b054b7942b69f64d4951cc9cbc7",
            "value": " 125/125 [00:00&lt;00:00, 2.11kB/s]"
          }
        },
        "1ab7c8d8ffa34c91abb04128aa83eabd": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "0aa274a0fc8d4f12a1681a0540fec575": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "b7927e51804248c18dc59fffecca8920": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "d9424302b7904363b9746fea3e778eed": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "a01b6ceb2d8c4821af1ba1205363a05a": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "ProgressStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "89890fae7b324674865e7e822800b6d6": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "d7ec4b054b7942b69f64d4951cc9cbc7": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "b127eda8120f4ae984dfba88b11f098d": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HBoxModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_de2d509c9d4e416b9cb3297af66de5df",
              "IPY_MODEL_61c2d30b20ed4be99d8dbcc5d79144c5",
              "IPY_MODEL_af10a01edb8447d0a1c2290999444c32"
            ],
            "layout": "IPY_MODEL_c424477487e54dc3adf3b43146f86e15"
          }
        },
        "de2d509c9d4e416b9cb3297af66de5df": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_5251980e31454753aa081cf80d7bd092",
            "placeholder": "​",
            "style": "IPY_MODEL_3a0015eeb31f47f3a9f195b9eaa9a304",
            "value": "Downloading (…)lve/main/config.json: 100%"
          }
        },
        "61c2d30b20ed4be99d8dbcc5d79144c5": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "FloatProgressModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_27dffe93767344bb9b4b94140e65e7a1",
            "max": 966,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_fdce41b626df407a8c5f8ca6592a75a4",
            "value": 966
          }
        },
        "af10a01edb8447d0a1c2290999444c32": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_1d37ccf21aa8448ca83e23f651a26302",
            "placeholder": "​",
            "style": "IPY_MODEL_a4bb59a07f3e4d7fa6372040e0f8392e",
            "value": " 966/966 [00:00&lt;00:00, 30.1kB/s]"
          }
        },
        "c424477487e54dc3adf3b43146f86e15": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "5251980e31454753aa081cf80d7bd092": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "3a0015eeb31f47f3a9f195b9eaa9a304": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "27dffe93767344bb9b4b94140e65e7a1": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "fdce41b626df407a8c5f8ca6592a75a4": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "ProgressStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "1d37ccf21aa8448ca83e23f651a26302": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "a4bb59a07f3e4d7fa6372040e0f8392e": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "f703fbde66e1452b9a4742521e8359a4": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HBoxModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_6251dab6c3ab475da0893051c00f089c",
              "IPY_MODEL_0d17fe252f10441cb3093d74c3c043f8",
              "IPY_MODEL_71829181fc7b410ab8abf2a9599e7736"
            ],
            "layout": "IPY_MODEL_e360888f5bbe417a8abe5d2e81da795e"
          }
        },
        "6251dab6c3ab475da0893051c00f089c": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_2f549e13f7354e2cbb27f3a0a7f95118",
            "placeholder": "​",
            "style": "IPY_MODEL_5d29aee6bc574ad0b00d4cdb29222df0",
            "value": "Downloading (…)solve/main/models.py: 100%"
          }
        },
        "0d17fe252f10441cb3093d74c3c043f8": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "FloatProgressModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_0f900b2a3dd446968a936a8eafa1e381",
            "max": 21133,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_7950cc5acfee49a69e64534b3455427b",
            "value": 21133
          }
        },
        "71829181fc7b410ab8abf2a9599e7736": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_c378b5452dc145efa1de9f61f37e7e04",
            "placeholder": "​",
            "style": "IPY_MODEL_89c553abe4854e8fb650c36821c458f7",
            "value": " 21.1k/21.1k [00:00&lt;00:00, 702kB/s]"
          }
        },
        "e360888f5bbe417a8abe5d2e81da795e": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "2f549e13f7354e2cbb27f3a0a7f95118": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "5d29aee6bc574ad0b00d4cdb29222df0": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "0f900b2a3dd446968a936a8eafa1e381": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "7950cc5acfee49a69e64534b3455427b": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "ProgressStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "c378b5452dc145efa1de9f61f37e7e04": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "89c553abe4854e8fb650c36821c458f7": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "e152d6e7571745439cb27b8b1e92d84f": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HBoxModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HBoxModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HBoxView",
            "box_style": "",
            "children": [
              "IPY_MODEL_20cf8da1f71a406b8f6659846e7d2cf8",
              "IPY_MODEL_d623dc5846fd46ae85d2944ec35b977c",
              "IPY_MODEL_8df3859fe02c437f8237d54c45231a0f"
            ],
            "layout": "IPY_MODEL_7b68cc66bd684f3db6267113bd32fb28"
          }
        },
        "20cf8da1f71a406b8f6659846e7d2cf8": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_34b650cd68174582add677bc309f8658",
            "placeholder": "​",
            "style": "IPY_MODEL_765658050b0d4ba992b352187a4583f2",
            "value": "Downloading pytorch_model.bin: 100%"
          }
        },
        "d623dc5846fd46ae85d2944ec35b977c": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "FloatProgressModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "FloatProgressModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "ProgressView",
            "bar_style": "success",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_e281da40d6ab46e1b84c405283ae1387",
            "max": 413868149,
            "min": 0,
            "orientation": "horizontal",
            "style": "IPY_MODEL_85aeb3a37ac8404b8c489e431bea3d2a",
            "value": 413868149
          }
        },
        "8df3859fe02c437f8237d54c45231a0f": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "HTMLModel",
          "model_module_version": "1.5.0",
          "state": {
            "_dom_classes": [],
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "HTMLModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/controls",
            "_view_module_version": "1.5.0",
            "_view_name": "HTMLView",
            "description": "",
            "description_tooltip": null,
            "layout": "IPY_MODEL_171282bb3da44430a11553b6e05507c3",
            "placeholder": "​",
            "style": "IPY_MODEL_13a8120b2506454d9b33596a74edae48",
            "value": " 414M/414M [00:02&lt;00:00, 171MB/s]"
          }
        },
        "7b68cc66bd684f3db6267113bd32fb28": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "34b650cd68174582add677bc309f8658": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "765658050b0d4ba992b352187a4583f2": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        },
        "e281da40d6ab46e1b84c405283ae1387": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "85aeb3a37ac8404b8c489e431bea3d2a": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "ProgressStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "ProgressStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "bar_color": null,
            "description_width": ""
          }
        },
        "171282bb3da44430a11553b6e05507c3": {
          "model_module": "@jupyter-widgets/base",
          "model_name": "LayoutModel",
          "model_module_version": "1.2.0",
          "state": {
            "_model_module": "@jupyter-widgets/base",
            "_model_module_version": "1.2.0",
            "_model_name": "LayoutModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "LayoutView",
            "align_content": null,
            "align_items": null,
            "align_self": null,
            "border": null,
            "bottom": null,
            "display": null,
            "flex": null,
            "flex_flow": null,
            "grid_area": null,
            "grid_auto_columns": null,
            "grid_auto_flow": null,
            "grid_auto_rows": null,
            "grid_column": null,
            "grid_gap": null,
            "grid_row": null,
            "grid_template_areas": null,
            "grid_template_columns": null,
            "grid_template_rows": null,
            "height": null,
            "justify_content": null,
            "justify_items": null,
            "left": null,
            "margin": null,
            "max_height": null,
            "max_width": null,
            "min_height": null,
            "min_width": null,
            "object_fit": null,
            "object_position": null,
            "order": null,
            "overflow": null,
            "overflow_x": null,
            "overflow_y": null,
            "padding": null,
            "right": null,
            "top": null,
            "visibility": null,
            "width": null
          }
        },
        "13a8120b2506454d9b33596a74edae48": {
          "model_module": "@jupyter-widgets/controls",
          "model_name": "DescriptionStyleModel",
          "model_module_version": "1.5.0",
          "state": {
            "_model_module": "@jupyter-widgets/controls",
            "_model_module_version": "1.5.0",
            "_model_name": "DescriptionStyleModel",
            "_view_count": null,
            "_view_module": "@jupyter-widgets/base",
            "_view_module_version": "1.2.0",
            "_view_name": "StyleView",
            "description_width": ""
          }
        }
      }
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}